New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/snap, daemon, overlord/snapstate: tests and fixes for "snap refresh" of a classic snap #2612
Conversation
…sh" of a classic snap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you! One question inline.
@@ -520,6 +520,11 @@ func Update(st *state.State, name, channel string, revision snap.Revision, userI | |||
channel = snapst.Channel | |||
} | |||
|
|||
if !flags.JailMode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a test for this as well?
@@ -520,6 +520,11 @@ func Update(st *state.State, name, channel string, revision snap.Revision, userI | |||
channel = snapst.Channel | |||
} | |||
|
|||
if !flags.JailMode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this tested? also seems obscure tbh, it will not be marked classic but it will be marked jailmode
c.Assert(err, IsNil) | ||
c.Check(snapsup.Flags.Classic, Equals, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sort of feel a test where we actually run the tasks and look also at final snapstate would be even better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be clear I think such a test would show the problem @mvo5 hit, these were passing anyway
@@ -520,6 +520,11 @@ func Update(st *state.State, name, channel string, revision snap.Revision, userI | |||
channel = snapst.Channel | |||
} | |||
|
|||
if !(flags.JailMode || flags.DevMode) { | |||
// adding a mode flag means add them all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the comment, the code seems ok without
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
No description provided.